local lo_strutils = require('bblibs.StrUtilsAPI')
-- 是否是开发模式
isDev = false




run_Yes = true;
run_No = false

--isDev=true,false
--游戏类型
--游戏类型
gameType = '0';
gameTypeZiChan = "0";
gameTypeFuZai = '1';
gameTypeGuanQia = '2';
gameTypeQuanJu = '3';

--府宅--政绩
fz_zhenji = '0'
fz_zhenji_ziYuan = '0';
fz_zhenji_ZhenJi = '0';

fz_fuJia_xianShi = false
fz_fuJia_renWu = false
fz_fuJia_chengJiu = false

fz_gongNeng_ziChan = run_No;
fz_gongNeng_zhengWu = run_No;
fz_gongNeng_zhiSi = run_No;
fz_gongNeng_HongYan = run_No;

-- zhengWuType
fz_zhengWu_ZiYuan = false
fz_zhengWu_ZhenWu = false

zhuJieMianGN_fuZhai=run_No
zhuJieMianGN_guanKa=run_No
zhuJieMianGN_shuYuan=run_No
zhuJieMianGN_laoFang=run_No
zhuJieMianGN_xunFang=run_No
zhuJieMianGN_fuBen=run_No
bangZhuSet_quYu=run_No  -- 帮助-区域


-- 判断两个变量是否相等
function equals(obj1, obj2)

    local flag = obj1 == obj2;

    if flag then
        return flag;
    end
    return tostring(obj1) == tostring(obj2);
end

function showMyUi()
    yesOrNo, results = showUI("ui.json");
    gameType = results.gameType;

    -- 府宅,附加项
    fz_fj = results.fz_fj;

    if not (string.find(fz_fj, "0", 0) == nil) then
        fz_fuJia_xianShi = true
    end

    if not (string.find(fz_fj, "1", 0) == nil) then
        fz_fuJia_renWu = true
    end
    if not (string.find(fz_fj, "2", 0) == nil) then
        fz_fuJia_chengJiu = true
    end

    --府宅——功能
    fz_gongNeng = results.fz_gongNeng;

    if not (string.find(fz_gongNeng, "0", 0) == nil) then
        fz_gongNeng_ziChan = run_Yes
    end
    if not (string.find(fz_gongNeng, "1", 0) == nil) then
        fz_gongNeng_zhengWu = run_Yes
    end

    if not (string.find(fz_gongNeng, "2", 0) == nil) then
        fz_gongNeng_zhiSi = run_Yes
    end

    if not (string.find(fz_gongNeng, "3", 0) == nil) then
        fz_gongNeng_HongYan = run_Yes
    end

    if not (string.find(results.fz_zhengWu, "0", 0) == nil) then
        fz_zhengWu_ZhenWu = false
        fz_zhengWu_ZiYuan = true

    else
        fz_zhengWu_ZhenWu = true
        fz_zhengWu_ZiYuan = false
    end



    zhuJieMianGN=results.zhuJieMianGN

    if not (string.find(zhuJieMianGN, "0", 0) == nil) then
        zhuJieMianGN_fuZhai = run_Yes
    end

    if not (string.find(zhuJieMianGN, "1", 0) == nil) then
        zhuJieMianGN_guanKa = run_Yes
    end

    if not (string.find(zhuJieMianGN, "2", 0) == nil) then
        zhuJieMianGN_shuYuan = run_Yes
    end

    if not (string.find(zhuJieMianGN, "3", 0) == nil) then
        zhuJieMianGN_laoFang = run_Yes
    end

    if not (string.find(zhuJieMianGN, "4", 0) == nil) then
        zhuJieMianGN_xunFang = run_Yes
    end

    if not (string.find(zhuJieMianGN, "5", 0) == nil) then
        zhuJieMianGN_fuBen = run_Yes
    end

    -- 帮助
    if not (string.find(results.bangZhuCheckBox, "0", 0) == nil) then
        bangZhuSet_quYu = run_Yes
    end



    --fzZhenJi= results.fzZhenJi
end